package de.breitbeil.jbooking.dao;

import java.io.Serializable;
import java.util.List;

public interface IGenericDao {

    public void makePersistent(Object entity);
    
    public void makeTransient(Object entity);
    
    public <TEntity, TKey extends Serializable> TEntity getBy(Class<TEntity> entityClass, TKey key);
    
    public <TEntity> List<TEntity> findAll(Class<TEntity> entityClass);

    public <TEntity> List<TEntity> findByAttribute(Class<TEntity> entityClass, String attributeName, Object attributeValue);

    public <TEntity> List<TEntity> findByAttributes(Class<TEntity> entityClass, List<String> attributeNames, List<Object> attributeValues);

}
